#ifndef ENDGAMEDIALOG_H
#define ENDGAMEDIALOG_H

#include <QDialog>
#include <QTimer>
#include <QIcon>
#include<QPixmap>
#include "config.h"
#include<QPaintEvent>
#include<QPainter>
namespace Ui {
class EndGameDialog;
}

class EndGameDialog : public QDialog
{
    Q_OBJECT
protected:
    void paintEvent(QPaintEvent *event);
public:
    explicit EndGameDialog(QWidget *parent = 0);
    ~EndGameDialog();
    void initScene(); //初始化窗口
//    void updateDialog(); //更新当前窗口

    //QTimer * m_timer; //计时器
    QPixmap pix;
signals:
    void showMainMenu(); //显示主菜单
    void closeMainWidget(); //关闭主窗口
    void showMainWidget(); //显示主窗口
    void endMusic();
    void endGame();
private slots:

    //重玩
    void on_again_clicked();
    //返回
    void on_back_clicked();

private:
    Ui::EndGameDialog *ui;
};

#endif // ENDGAMEDIALOG_H
